mui.init({
	gestureConfig: {
		longtap: true
	},
	 keyEventBind: {
	  backbutton: false //关闭back按键监听
	  }
});
document.addEventListener('longtap', function(e) {
	if (e.target.tagName == "IMG") {
		console.log(e.target.src);
		mui.confirm('是否下载此图片', '确认下载', '下载', function(d) {
			if(d.index==0){
				
			var down = plus.downloader.createDownload(e.target.src, {}, function(e, a) {
				console.log(e); 
				plus.gallery.save(e.filename,function (e) {
				mui.toast('下载成功,请在相册中查看')
				console.log("下载成功,请在相册中查看");
				},function (e) {
					console.log("下载失败,请重试");
				})
			})
			down.start()
			}
		})
	}
})